/* Author : Maisa Nurul Agnia */
package jtk.project4.fleet.field;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;
import nl.coderight.jazz.form.field.TextField;
import nl.coderight.jazz.form.field.button.MenuButton;

public class LocationField extends GroupControl{
	private ComboField<String> locationField; 
//	private MenuButton testField;
	private ComboField<String> termField;
	private TextField invoiceField; 
	private TextField orderField;
	
	public LocationField(String bindID){
		//setTitle("header.PurchasedFrom(Vendor)"); //disesuaikan dengan nama field
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields()
	{
		invoiceField = new TextField("invoice",25);
		orderField = new TextField("order",25);
		
		locationField = new ComboField <String> ("location","loc");
		locationField.setPreferredSize(invoiceField.getPreferredSize());
		
		termField = new ComboField <String> ("term","Term");
		termField.setPreferredSize(invoiceField.getPreferredSize());
		
		//testField = new MenuButton("tes");
		
			
	}
	
	private void createLayout()
	{
		setLayout(new FormLayout())

		.addLabel("label.Location")			.addField(locationField)
		.addRow()
		.addLabel("label.Term") 			.addField(termField)
		.addRow()
		.addLabel("label.Invoice/Quote#")	.addField(invoiceField)
		.addRow()
		.addLabel("label.Order#")			.addField(orderField)
		.addRow()	
		//.addLabel("label.Tes#")			.addField(testField)

		;
	}



}
